<template>
  <!-- 放置一个弹层 用来编辑新增节点 -->
  <div class="dialog">
    <el-dialog :title="info.title" :visible="info.isEdit" @close="btnCancel">
      <!-- 表单 -->
      <el-form ref="perForm" :model="info">
        <el-form-item label="昵称" prop="nickname">
          <el-input style="width: 90%" />
        </el-form-item>
      </el-form>
      <el-row slot="footer" type="flex" justify="center">
        <el-col :span="6">
          <el-button size="small" type="primary" @click="btnOK" :loading="isLoading">确定</el-button>
          <el-button size="small" @click="btnCancel">取消</el-button>
        </el-col>
      </el-row>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'Edit',
  props: ['info'],
  data() {
    return {
      options: []
    }
  },

  watch: {},
  methods: {
    btnCancel() {
      this.$emit('close', false)
    },

    btnOK() {
      this.$emit('success')
    }
  }
}
</script>

<style lang="scss" scoped>
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}

.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}

.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
</style>
